#ifndef  _MY_RTOS_H
#define  _MY_RTOS_H
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"
#include "list.h"


#define  Yield()            taskYIELD()
#define  Sleep(Tick)        vTaskDelay(Tick)
#define  Wait(sema)         xSemaphoreTake(sema,portMAX_DELAY)
#define  Signal(sema)       xSemaphoreGive(sema)    // never block
#define  WaitT(sema,Tick)   xSemaphoreTake(sema,Tick)
#define  SignalT(sema,Tick) xSemaphoreGive(sema,,Tick)

#define  TaskRun()          vTaskStartScheduler()
#endif